1. Field of the Invention
The present invention relates to a digital copying machine, an image reading device used in the digital copying machine to take in the image of an original document, compress the image data and store it in an image memory, and an image processing method used in these devices. More particularly, it relates to improvements in techniques of compressing and expanding image data used in the digital copying machine, and to improvements in image data compressing device or transferred document reading/compressing device used in a digital copying machine, a facsimile or the like which is provided with an automatic document feeding device.
2. Description of the Prior Art
In a digital copying machine, a facsimile or the like, in general, image data (image information) obtained by reading an original document (picture) with an image reading device is temporarily stored in an image memory, and a duplicate image of the original document is printed by using the image data stored in the image memory. Therefore, such a digital copying machine or a facsimile has an advantage that, once an original document has been read, the image data stored in the image memory can be used thereafter to print a plurality of duplicate copies of the original document, edit the image data and print it out, or transmit the original document via facsimile a plurality of times.
Such a digital copying machine or a facsimile generally handles a fairly great amount of data. Thus in order to reduce the requirement for the image memory capacity of storing image data, or to increase the speed of processing image data, the image data obtained by reading original document is compressed by means of a compressor before storing it in the image memory. Then, when the duplicate image is to be printed or transmitted via facsimile based on the image data, the compressed image data stored in the image memory is expanded into the original image data.
In such a digital copying machine or a facsimile of the prior art, compression and expansion of the image data have been carried out separately for every sheet of original document.
Copying of one sheet of original document in a digital copying machine, for example, is carried out in the following procedure.
(1) One sheet of the original document is read and image data corresponding to the original document is stored in an input image memory. PA1 (2) Image data for one sheet of the original document stored in the input image memory is compressed and stored in a compressed image memory. PA1 (3) Image data for one sheet of the original document stored in the compressed image memory is expanded and stored in an output image memory. PA1 (4) A duplicate image of the original document is printed out based on the expanded image data stored in the output image memory.
With the conventional image data processing method (compression and expansion techniques) described above, however, the image data is expanded after compression of the image data for one sheet of original document has been completed. This leads to a problem that longer time is required to process the image data, resulting in a delay in starting to print the image. To counter this problem, such a digital copying machine provided with an image memory has been proposed that image data obtained by reading an original document is divided into a plurality of blocks each having a specified number of lines, with the blocks of data being compressed separately, and the compressed blocks are expanded successively by starting with the block which has been compressed first, thereby enabling it to start printing earlier. In this case, when compression of the first image data block is completed, for example, the first block can be expanded at the same time as the second block is compressed. Therefore, except for the initial and final stages of processing the image data, compression and expansion of image data can be performed simultaneously resulting in reduced time required for processing the image data.
In order to increase the copying speed further, such a digital copying machine has also be proposed that starts printing of image data during expansion of compressed image data.
When printing of image data is to be started before expansion of the image data is completed, timing of starting to print must be set carefully so that the progress of printing does not outrun the progress of expansion. In case the printing speed is slower than the expanding speed, progress of printing does not outrun the progress of expansion even when printing is started immediately after starting the expansion of the image data. However, because the printing speed is generally faster than the expanding speed, timing of starting to print must be set by predicting the time when expansion will be completed, so that the progress of printing does not outrun the progress of expansion. Thus in case all blocks are expanded at the same speed (e.g. lowest speed), different expanders do not complete expanding operations at the same time when the size and/or number of blocks assigned to the expanders are different. In this case, some of the expanders are forced to suspend the expanding operation, resulting in decreased efficiency of using the plurality of expanders. Also in case image data is divided along the principal scanning (horizontal) direction into a plurality of blocks and printing is started while the image data is being expanded, start time of printing is determined by the block which would take the longest time to expand. This causes the start of printing to be later than in the case where expanding operations for all blocks end at the same time.
In case the image data is divided along the auxiliary scanning (vertical) direction into five blocks and also divided along the principal scanning (horizontal) direction into two blocks thereby to compress the blocks while using first and second expanders in expanding the blocks, expanding the left side block of the compressed image data with the first expander and expanding the right side block with the second expander naturally results in higher expanding speed than in the case where only one expander is used. Also in case the image data is expanded at a uniform expanding speed (e.g. at the lowest expanding speed), both expanders complete expansion at the same time because the right and left blocks have the same sizes.
However, in case the image data divided along the auxiliary scanning direction into five blocks and also divided along the principal scanning direction into two blocks is rotated by 90.degree. during expansion as shown in FIG. 8, the expanded image data which is sent to the output image memory is converted to image data which is divided into two blocks in the auxiliary scanning direction and divided into five blocks in the principal scanning direction. Consequently, number of blocks in each row (band) becomes five when viewed in the order of output (order of printing), while the first expander and the second expander expand different numbers of blocks with regard to the expansion of each row (e.g. the first expander expands three blocks and the second expander expands two blocks). Therefore, the expanders cannot complete expanding operations at the same time. This results in lower efficiency of expander operation because one expander remains in operation while the other expander is not in operation. Also when the image data is rotated by 90.degree., direction of expansion is different from the direction of printing and therefore printing of a row cannot be started unless expansion of the row is completed. Therefore, when expanding the image data of each row in this case, end time of expansion for the row becomes later than that in such a case as two expanders complete the expanding operations at the same time, resulting in corresponding delay in the start of printing.
The conventional image reading apparatus of such a digital copying machine or facsimile usually starts compression of image data after completing the process of reading one sheet of original document and storing the image data of the one sheet of original document in the input image memory. This results in such a problem that longer time is taken from the start of reading the original document to the end of compressing the image data.
To counter such problems, such an image reading device for digital copying machine or facsimile has recently been proposed that starts compression of image data without waiting the reading of image data to be completed and thereby reduces the time taken in data processing as a whole. In this case, it is necessary that the length of the ordinal document in the auxiliary scanning direction is known beforehand and the length to be continuously compressed must be set according to the length of the ordinal document. Thus compression speed varies depending on the type of image (text, photograph, etc.) although the speed of reading the input image is nearly constant. As a result, when the predicted highest compression speed is faster than the speed of taking in the input image, compression overruns the input thereby causing the data processing to stop at the instant, unless the length of image data to be compressed continuously is set and proper time to start compression is determined according to the length. That is, when the length of the original document to be scanned is not known, the length of image data to be compressed continuously cannot be determined, and therefore compression of the image data cannot be started until reading of the original document is completed.
However, it is very difficult to determine the length of the original document before reading. Such a method may be employed as a sensor for detecting the length of the original document is installed on a paper feeder tray of an automatic document feeder. With this configuration, however, when original document sheets of different sizes are placed on the paper feed tray at the same time, length of the original document to be read cannot be detected.
Also in case compression of image data is started by setting the length of the original document to be continuously compressed before the length of the original document is established, when the original image is shorter than the length to be continuously compressed, other image data than that on the input image memory is mistakenly compressed. Thus such a problem arises as compression must be done over again when the end of original document is detected, by interrupting the compression and setting the length to be continuously compressed once again.
To counter such a problem, a method of compressing image data by dividing it into blocks of specified length has been proposed, where the length of image data to be continuously compressed is set to a specified value and accordingly compression is carried out when input of image of that length is recognized.
With this method, however, compression cannot be started until the input of image data in blocks of the specified length is completed. Thus although compression can be started before the input of image data of one sheet of original document is completed, compression cannot be started until the input of image data of one block length is completed, in the unit of block.